<template>
  <div id="app">
    <p>数量：<input type="text" v-model="count"><br>
        价格：<input type="text" v-model="price"><br>
        总价：{{sum}}</p>
  </div>
</template>

<script>
export default {
  name:'app',
  data(){
    return {
      count:3,
      price:10
    }
  },
  computed:{
    sum(){
      return "$"+this.count*this.price
    }
  }

}
</script>

<style>

  
</style>
